x86emul: CMPXCHG{8,16}B ignore prefixes
authorJan Beulich <jbeulich@suse.com>
Wed, 18 Jan 2017 08:44:49 +0000 (09:44 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 18 Jan 2017 08:44:49 +0000 (09:44 +0100)
commitaf6534e8d40308cd52d46e84169c4563808a8958
treea944031e15212412fc9c87c1e2116e672a23099d
parent297cf3d1cf998d2fbc8e63e92034ce08f60c3b60
x86emul: CMPXCHG{8,16}B ignore prefixes

This removes 0F C7 from the list of two-byte opcodes treating prefixes
66, F3, and F2 as opcode extensions. We better manually handle this in
the opcode specific code:
- CMPXCHG8B ignores all these prefixes (its handling is being adjusted
  accordingly, with a respective test case added as well, to avoid
  re-introducing the subject of XSA-200),
- RDRAND/RDSEED (support to be added subsequently) honor 66, but treat
  F3 and F2 as opcode extensions (resolving to RDPID in the RDSEED
  case, which in turn ignores 66).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
master commit: 54abe826c8297e12f805be2bcf318ef75cc7f58d
master date: 2016-12-14 10:08:22 +0100
tools/tests/x86_emulator/test_x86_emulator.c
xen/arch/x86/x86_emulate/x86_emulate.c